<{include file="page/header.htm"}>
<div class="page-content">
                <!-- Page Breadcrumb -->
                <div class="page-breadcrumbs">
                    <ul class="breadcrumb">
                        <li>
                            <i class="fa fa-home"></i>
                            <a href="#">系统设定</a>
                        </li>
                        <li class="active">用户管理</li>
                    </ul>
                </div>
                <!-- /Page Breadcrumb -->
                
                <!-- Page Header -->
                <div class="page-header position-relative">
                    <div class="header-title">
                        <h1>
                            用户管理
                        </h1>
                        <small>
                                <i class="fa fa-angle-right"></i>
                                <{if $item}>编辑<{else}>添加<{/if}>用户
                       </small>
                    </div>
                    <!--Header Buttons-->
                    <div class="header-buttons">
                        <a class="sidebar-toggler" href="#">
                            <i class="fa fa-arrows-h"></i>
                        </a>
                        <a class="refresh" id="refresh-toggler" href="">
                            <i class="glyphicon glyphicon-refresh"></i>
                        </a>
                        <a class="fullscreen" id="fullscreen-toggler" href="#">
                            <i class="glyphicon glyphicon-fullscreen"></i>
                        </a>
                    </div>
                    <!--Header Buttons End-->
                </div>
                <!-- /Page Header -->
                <!-- Page Body -->
                <div class="page-body">
                
                  <{include file="page/msg.htm"}>
                
                <div class="row">
                                <div class="col-lg-12 col-sm-12 col-xs-12">
                                    <div class="widget radius-bordered">
                                        <div class="widget-header bg-themeprimary">
                                            <span class="widget-caption"><{if $item}>编辑<{else}>添加<{/if}>用户</span>
                                            <div class="widget-buttons">
                                               <button type="button" class="btn btn-success" onclick="window.location='<{url path='adminuser'}>';"><i class="fa fa-mail-reply-all"></i>返回</button> 
                                            </div>
                                        </div>
                                        <div class="widget-body">
                                            <div class="row">
                                            	<div class="col-sm-6 col-xs-6">
                                                <form id="dataForm" method="post" class="form-horizontal"
                                                action="<{url path='adminuser/save'}>">
                                                <input type="hidden" name="user_id" value="">
                                                
                                                <div class="form-group">
                                                    <label class="col-lg-4 control-label">用户名</label>
                                                    <div class="col-lg-8">
                                                        <input type="text" class="form-control" name="username" datatype="s3-16"  nullmsg="用户名不能为空!" errormsg="用户名至少2个字符,最多16个字符！" ajaxurl="<{url path='adminuser/valid' id=$item->user_id}>" />
                                                    </div>
                                                </div>
                                                
                                                <div class="form-group">
                                                    <label class="col-lg-4 control-label">真实姓名</label>
                                                    <div class="col-lg-8">
                                                        <input class="form-control" name="realname" type="text" datatype="s2-16" nullmsg="真实姓名不能为空!" errormsg="真实姓名至少2个字符,最多16个字符！"  />
                                                    </div>
                                                </div>
                                                
                                                <div class="form-group">
                                                    <label class="col-lg-4 control-label">密码</label>
                                                    <div class="col-lg-8">
                                                        <input type="password" id="password" class="form-control" name="password" ignore="ignore" datatype="*6-15"  errormsg="密码范围在6~15位之间！"/>	
                                                    </div>
                                                </div>

                                                <div class="form-group">
                                                    <label class="col-lg-4 control-label">重复密码</label>
                                                    <div class="col-lg-8">
                                                        <input type="password" class="form-control" datatype="*6-15" ignore="ignore" name="confirmPassword" id="confirmPassword" recheck="password" errormsg="您两次输入的账号密码不一致！" />
                                                    </div>
                                                </div>

                                                <div class="form-group">
                                                    <label class="col-lg-4 control-label">Email</label>
                                                    <div class="col-lg-8">
                                                        <input class="form-control" name="email" type="text" datatype="e" ignore="ignore" errormsg="请输入正确的邮箱！"/>
                                                    </div>
                                                </div>
 
                                               <div class="form-group">
                                                    <label class="col-lg-4 control-label">状态</label>
                                                    <div class="col-lg-8">
                                                        <div class="radio" style="display:inline-block; margin-right:3px;">
                                                            <label>
                                                                <input name="is_active" type="radio" value="1" checked="checked" class="colored-blue">
                                                                <span class="text">启用</span>
                                                            </label>
                                                        </div>
                                                        <div class="radio" style="display:inline-block">
                                                            <label>
                                                                <input name="is_active" type="radio" value="-1" class="colored-blue">
                                                                <span class="text">禁用</span>
                                                            </label>
                                                        </div>
                                                    </div>
                                                </div>
                                                
                                                <div class="form-group">
                                                    <label class="col-lg-4 control-label">电话</label>
                                                    <div class="col-lg-8">
                                                        <input class="form-control" name="phone" type="text" />
                                                    </div>
                                                </div>
                                                
                                                <div class="form-group">
                                                    <div class="col-lg-offset-4 col-lg-8">
                                                        <input class="btn btn-primary" type="submit" value="提交" />
                                                        <button type="button" class="btn btn-warning" onclick="window.location='<{url path='adminuser'}>';">返回</button> 
                                                    </div>
                                                </div>
                                            </form>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                                
                            </div>  
                
                </div>
                <!-- /Page Body -->
            </div>
<{include file="page/footer.htm"}>
<script src="/skin/adminhtml/js/form.js"></script>
<script src="/skin/adminhtml/js/Validform.js"></script>
<script src="/skin/adminhtml/js/tools.js"></script>
<script type="text/javascript">
	$(document).ready(function () {
		validate('#dataForm');
	    var form = new Form('dataForm');
		form.init(<{json data=$item}>);
	});
</script>